// src/api/honor.js
import request from '@/utils/request'

// 创建人才计划/荣誉称号
export function createHonor(data) {
	return request({
		url: '/api/honors',
		method: 'post',
		data
	})
}

// 获取个人荣誉列表
export function getMyHonors(params) {
	return request({
		url: '/api/honors/mine',
		method: 'get',
		params
	})
}

// 获取荣誉详情
export function getHonor(id) {
	return request({
		url: `/api/honors/${id}`,
		method: 'get'
	})
}

// 更新荣誉
export function updateHonor(id, data) {
	return request({
		url: `/api/honors/${id}`,
		method: 'put',
		data
	})
}

// 删除荣誉
export function deleteHonor(id) {
	return request({
		url: `/api/honors/${id}`,
		method: 'delete'
	})
}

// 管理员：获取所有荣誉
export function getAllHonors() {
	return request({
		url: '/api/honors/all',
		method: 'get'
	})
} 